<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .a {
            width: 100px;
            height: 100px;
            background-color: #f00;
            float: right;
            position: relative;
            /* overflow: hidden; */
        }

        .a1 {
            position: absolute;
            width: 100px;
            height: 100px;
            background-color: #ff0;
            top: 0;
            transition: 1s;

            /* 改变中心点的位置  x y  */
            transform-origin: -50% 50%;
            /* 0不转 1转 */
            /* transform: rotate3d(0, 0, 1, 90deg); */
            transform: rotate(90deg);
        }

        .a:hover .a1 {
            transform: rotate(0);
        }


        .b {
            width: 100px;
            height: 100px;
            background-color: #000;
            transition: 1s;
            transform-origin: 0 0;
        }

        .b:hover {
            transform: scale(2);
        }


        p {
            text-align: right;
            font-size: 20px;
            transform: scale(0.25);
            transform-origin: 100% 0;
        }
    </style>
</head>

<body>

    <div class="a">
        <div class="a1">111</div>
    </div>


    <div class="b"></div>


    <p>呵呵</p>

</body>

</html>